home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / BBS-Archive / Util / Misc / AssignWedge.lha / Source / AssignWedge.h < prev    next >
C/C++ Source or Header  |  1994-12-02  |  3KB  |  139 lines

  1. #ifndef ASSIGNWEDGE_H
  2. #define ASSIGNWEDGE_H
  3.  
  4.  
  5. /****************************************************************************/
  6.  
  7.  
  8. /* This file was created automatically by CatComp.
  9.  * Do NOT edit by hand!
  10.  */
  11.  
  12.  
  13. #ifndef EXEC_TYPES_H
  14. #include <exec/types.h>
  15. #endif
  16.  
  17. #ifdef CATCOMP_ARRAY
  18. #undef CATCOMP_NUMBERS
  19. #undef CATCOMP_STRINGS
  20. #define CATCOMP_NUMBERS
  21. #define CATCOMP_STRINGS
  22. #endif
  23.  
  24. #ifdef CATCOMP_BLOCK
  25. #undef CATCOMP_STRINGS
  26. #define CATCOMP_STRINGS
  27. #endif
  28.  
  29.  
  30. /****************************************************************************/
  31.  
  32.  
  33. #ifdef CATCOMP_NUMBERS
  34.  
  35. #define MSG_PROMPT_GAD 0
  36. #define MSG_HAIL_GAD 1
  37. #define MSG_ASSIGN_GAD 2
  38.  
  39. #endif /* CATCOMP_NUMBERS */
  40.  
  41.  
  42. /****************************************************************************/
  43.  
  44.  
  45. #ifdef CATCOMP_STRINGS
  46.  
  47. #define MSG_PROMPT_GAD_STR "Retry|Assign...|Mount|Deny|Cancel"
  48. #define MSG_HAIL_GAD_STR "Assignment for \"%s:\""
  49. #define MSG_ASSIGN_GAD_STR "Assign"
  50.  
  51. #endif /* CATCOMP_STRINGS */
  52.  
  53.  
  54. /****************************************************************************/
  55.  
  56.  
  57. #ifdef CATCOMP_ARRAY
  58.  
  59. struct CatCompArrayType
  60. {
  61.     LONG   cca_ID;
  62.     STRPTR cca_Str;
  63. };
  64.  
  65. static const struct CatCompArrayType CatCompArray[] =
  66. {
  67.     {MSG_PROMPT_GAD,(STRPTR)MSG_PROMPT_GAD_STR},
  68.     {MSG_HAIL_GAD,(STRPTR)MSG_HAIL_GAD_STR},
  69.     {MSG_ASSIGN_GAD,(STRPTR)MSG_ASSIGN_GAD_STR},
  70. };
  71.  
  72. #endif /* CATCOMP_ARRAY */
  73.  
  74.  
  75. /****************************************************************************/
  76.  
  77.  
  78. #ifdef CATCOMP_BLOCK
  79.  
  80. static const char CatCompBlock[] =
  81. {
  82.     "\x00\x00\x00\x00\x00\x22"
  83.     MSG_PROMPT_GAD_STR "\x00"
  84.     "\x00\x00\x00\x01\x00\x16"
  85.     MSG_HAIL_GAD_STR "\x00\x00"
  86.     "\x00\x00\x00\x02\x00\x08"
  87.     MSG_ASSIGN_GAD_STR "\x00\x00"
  88. };
  89.  
  90. #endif /* CATCOMP_BLOCK */
  91.  
  92.  
  93. /****************************************************************************/
  94.  
  95.  
  96. struct LocaleInfo
  97. {
  98.     APTR li_LocaleBase;
  99.     APTR li_Catalog;
  100. };
  101.  
  102.  
  103. #ifdef CATCOMP_CODE
  104.  
  105. STRPTR GetString(struct LocaleInfo *li, LONG stringNum)
  106. {
  107. LONG   *l;
  108. UWORD  *w;
  109. STRPTR  builtIn;
  110.  
  111.     l = (LONG *)CatCompBlock;
  112.  
  113.     while (*l != stringNum)
  114.     {
  115.         w = (UWORD *)((ULONG)l + 4);
  116.         l = (LONG *)((ULONG)l + (ULONG)*w + 6);
  117.     }
  118.     builtIn = (STRPTR)((ULONG)l + 6);
  119.  
  120. #define XLocaleBase LocaleBase
  121. #define LocaleBase li->li_LocaleBase
  122.     
  123.     if (LocaleBase)
  124.         return(GetCatalogStr(li->li_Catalog,stringNum,builtIn));
  125. #define LocaleBase XLocaleBase
  126. #undef XLocaleBase
  127.  
  128.     return(builtIn);
  129. }
  130.  
  131.  
  132. #endif /* CATCOMP_CODE */
  133.  
  134.  
  135. /****************************************************************************/
  136.  
  137.  
  138. #endif /* ASSIGNWEDGE_H */
  139.